<?php
/**
 * Created by PhpStorm.
 * User: superxing-cto
 * Date: 17/5/2
 * Time: 10:38
 */

namespace App\Models;

/**
 * Class InvitationCode
 * @property string title
 * @property integer code
 * @property boolean status
 */
class InvitationCode extends ApplicationModel
{
    protected $fillable = [
        'title',
        'code',
        'status',
    ];

    public function scopeRelease($query)
    {
        return $query->where('status', true);
    }

    public function users()
    {
        return $this->hasMany(User::class);
    }
}